package com.design.pattern.facade;

/**
 * @version 1.0
 * @author: CRM_SYSTEM
 * @date: 2022/10/12 22:04
 * @Description:
 */
public class TestDemo {
    public static void main(String[] args) {
        //原始写法
        //1、校验资格
        //2、扣钱
        //3、物流
        QualifyService qualifyService=new QualifyService();
        PaymentService paymentService=new PaymentService();
        ShippingService shippingService=new ShippingService();

        if (qualifyService.isAvailable()){
            if (paymentService.isPay()){
                if (shippingService.isShipping()){
                    System.out.println("完成");
                }
            }
        }

        //门面
        System.out.printf("---------------门面------------------------------");
        FacadeService facadeService=new FacadeService();
        facadeService.isOrder();



    }
}
